package LBC;

import Objects.Body;

public class Contact {

    Body a;
    Body b;
    float pX;
    float pY;
    float normal[]=new float[2];
    float rAX;
    float rAY;
    float rA;
    float rBX;
    float rBY;
    float rB;
    
Contact(Body a, Body b, float pX, float pY, float normal[]){
    this.a=a;
    this.b=b;
    this.pX=pX;
    this.pY=pY;
    this.normal=normal;
    this.rAX=pX-a.shape.getCenterX();
    this.rAY=pY-a.shape.getCenterY();
    this.rA=(float)(Math.sqrt((Math.pow(rAX,2))+(Math.pow(rAY,2))));
    this.rBX=pX-b.shape.getCenterX();
    this.rBY=pY-b.shape.getCenterY();
    this.rB=(float)(Math.sqrt((Math.pow(rBX,2))+(Math.pow(rBY,2))));
    
}

Contact(Contact c){
    this.a=c.a;
    this.b=c.b;
    this.pX=c.pX;
    this.pY=c.pY;
    this.normal=c.normal;
    this.rAX=c.rAX;
    this.rAY=c.rAY;
    this.rA=c.rA;
    this.rBX=c.rBX;
    this.rBY=c.rBY;
    this.rB=c.rB;
}

}
